import validateService from '../services/validateService';

let page3Ctrl = function (validateService) {
    let vm = this;
    console.log(validateService)
    vm.title = validateService.testVal('This is page 3');

    vm.family = [
        { name: 'Andy' },
        { name: 'Jamie' },
        { name: 'Lucy' },
        { name: 'Quinn' }
    ];
    var zTreeObj;
    // zTree 的参数配置，深入使用请参考 API 文档（setting 配置详解）
    var setting = {};
    // zTree 的数据属性，深入使用请参考 API 文档（zTreeNode 节点数据详解）
    var zNodes = [
        {
            name: "test1", open: true, children: [
                { name: "test1_1" }, { name: "test1_2" }]
        },
        {
            name: "test2", open: true, children: [
                { name: "test2_1" }, { name: "test2_2" }]
        }
    ];
    zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, zNodes);
};
// page3Ctrl.$inject = ['validateService']
export default ngModule => {
    validateService(ngModule);

    console.log()
    // ngModule.
    ngModule.controller('page3Ctrl', page3Ctrl);
}